home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / TransSkel 3.24 / Source / Control Stuff / SkelFlashButton.c < prev    next >
Text File  |  1996-01-17  |  603b  |  30 lines

  1. /*
  2.  * Flash a push button to simulate a click in it.
  3.  */
  4.  
  5. # include    "TransSkel.h"
  6.  
  7.  
  8. # define    hiliteClicks    8
  9.  
  10. pascal void
  11. SkelFlashButton (ControlHandle ctrl)
  12. {
  13. short    oldHilite;
  14. long    dummy;
  15.  
  16.     oldHilite = (**ctrl).contrlHilite;
  17.     /*
  18.      * Flash button.  The constant to use varies.  Universal headers release 2
  19.      * define a new constant kInButtonControlPart.  Release 1 and the old Apple
  20.      * headers use inButton.
  21.      */
  22. #if skelUnivHeaders > 1
  23.     HiliteControl (ctrl, kInButtonControlPart);
  24. #else
  25.     HiliteControl (ctrl, inButton);
  26. #endif
  27.     Delay ((long) hiliteClicks, &dummy);
  28.     HiliteControl (ctrl, oldHilite);
  29. }
  30.